<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%
    extras.Log log = (extras.Log) session.getAttribute("log");
%>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <link rel="stylesheet" type="text/css" href="styles.css"/>
        <script type="text/javascript" src="jquery-1.7.2.js"></script>
        <script type="text/javascript" src="sendAjaxFind.js"></script>
        <title>Поиск</title>
    </head>
    <body>
        <div class="navigation">
            <%@include file="navigation.jspf"%>
        </div><br/>
        <h1>Список отделов (департаментов)</h1>
        <% if (log != null) {%>
        <div class="<%= log.isCorrect() ? "log-correct" : "log-incorrect"%>"><%= log.getMessage()%></div>
        <% } else {%><br/><% }%>
        <form>
            <script type="text/javascript">window.onload=findDept;</script>
            <label for="findWord">
                Поиск департамента: <input name="find" type="text" id="findWord" onkeyup="findDept()"/>
            </label><br/>
            <label for="byName">
                по названию<input name="warranty" type="radio" id="byName" value="byName" checked/>
            </label>
            <label for="byLoc">
                по месту расположения<input name="warranty" type="radio" id="byLoc" value="byLoc"/>
            </label>
        </form>
        <br/>
        <div id="findResult">
        </div>
        <% session.removeAttribute("log");%>
    </body>
</html>
